using System;
using System.Collections.Generic;
using System.Text;

namespace NBusiness.Query.SqlServer
{
    public class SqlLike : SqlBoolean
    {
        public bool Not
        {
            get { return Operator != SqlBooleanOperator.Like; }
            set { Operator = (value ? SqlBooleanOperator.NotLike : SqlBooleanOperator.Like); }
        }

        public SqlLike()
            : base(SqlBooleanOperator.Like)
        { }
        public SqlLike(IEvaluatable left, IEvaluatable right)
            : this(left, right, false)
        { }
        public SqlLike(IEvaluatable left, IEvaluatable right, bool not)
            : base(left, (not ? SqlBooleanOperator.NotLike : SqlBooleanOperator.Like), right)
        { }
    }
}
